﻿using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using TamoCRM.Domain.Branches;
using TamoCRM.Domain.Groups;
using TamoCRM.Domain.UserRole;
using TamoCRM.Web.Mvc.Areas.Admin.Models.Groups;

namespace TamoCRM.Web.Mvc.Areas.Admin.Models.Users
{
    public class CreateUserModel
    {
        [Required]
        [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.")]
        [DataType(DataType.Password)]
        [Display(Name = "password")]
        public string Password { get; set; }

        [DataType(DataType.Password)]
        [Display(Name = "Confirm new password")]
        [Compare("Password", ErrorMessage = "The new password and confirmation password do not match.")]
        public string ConfirmPassword { get; set; }

        [Required]
        [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.")]
        public string Username { get; set; }

        [Required]
        public string Email { get; set; }
        public int CreatedBy { get; set; }
        public string Description { get; set; }
        public string FullName { get; set; }
        public string Mobile { get; set; }
        public string StationId { get; set; }
        public int GroupType { get; set; }

        public IEnumerable<RoleInfo> AllRole { get; set; }
        public PostedRole PostedRole { get; set; }
        public IEnumerable<RoleInfo> SelectedRole { get; set; }

        public IEnumerable<BranchInfo> AllBranch { get; set; }
        public IEnumerable<BranchInfo> SelectedBranch { get; set; }
        public PostedBranch PostedBranch { get; set; }

        public IEnumerable<GroupInfo> AllGroups { get; set; }
        public IEnumerable<GroupInfo> SelectedGroup { get; set; }
        public PostedGroup PostedGroup { get; set; }
    }
}